package com.hxzy.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hxzy.common.core.domain.entity.SysDictData;
import com.hxzy.system.domain.dto.DictDataSearchDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 字典表
 * @author 64689
 */
@Mapper
public interface SysDictDataMapper extends BaseMapper<SysDictData> {


    /**
     * 同步修改字典类型
     *
     * @param oldDictType 旧字典类型
     * @param newDictType 新旧字典类型
     * @return 结果
     */
    int updateById(@Param("oldDictType")String oldDictType, @Param("newDictType") String newDictType);
    /**
     * 根据字典类型查询字典数据
     *
     * @param dictType 字典类型
     * @return 字典数据集合信息
     */
    List<SysDictData> selectDictDataByType(String dictType);

 ;

    SysDictData selectDictDataById(Long dictCode);

    /**
     *
     * @param of
     * @param dictData
     * @return
     */
    IPage<SysDictData> selectDictDataList(Page<SysDictData> of, @Param(value = "dict") DictDataSearchDTO dictData);

    boolean updateBy(SysDictData dict);

    int deleteDictDataByIds(Long[] dictCodes);

    List<SysDictData> paymentList();

    List<SysDictData> approveItemNameList();

    List<SysDictData> serviceTypeIdList();

    List<SysDictData> consigorList();

    List<SysDictData> certificateGradeList();

    List<SysDictData> delegateTypeIdList();

    List<SysDictData> serviceChargeList();
}
